﻿<UserControl x:Class="Earthwatchers.UI.GUI.Controls.Stats" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="54" d:DesignWidth="250">
    <UserControl.Resources>
        <Storyboard x:Name="StartStoryBoard">
            <DoubleAnimation Duration="0:0:0.5" To="0.8" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LandStatsBorder"  />
        </Storyboard>
        <Storyboard x:Name="HighlightStoryBoard">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="BlurRadius" Storyboard.TargetName="HighlightIcon" RepeatBehavior="3x">
                <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="50" />
                <EasingDoubleKeyFrame KeyTime="0:0:2" Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="FadeOut1" BeginTime="0:0:0">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" Storyboard.TargetName="LandStats1">
                <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-15" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LandStats1">
                <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="FadeIn1" BeginTime="0:0:0">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" Storyboard.TargetName="LandStats1">
                <EasingDoubleKeyFrame KeyTime="0" Value="40" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LandStats1">
                <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Name="FadeOut2" BeginTime="0:0:0.5">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" Storyboard.TargetName="LandStats2">
                <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-30" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LandStats2">
                <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="FadeIn2" BeginTime="0:0:0.5">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" Storyboard.TargetName="LandStats2">
                <EasingDoubleKeyFrame KeyTime="0" Value="25" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LandStats2">
                <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Name="FadeOut3" BeginTime="0:0:1">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" Storyboard.TargetName="LandStats3">
                <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-45" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LandStats3">
                <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="FadeIn3" BeginTime="0:0:1">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" Storyboard.TargetName="LandStats3">
                <EasingDoubleKeyFrame KeyTime="0" Value="10" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LandStats3">
                <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Border x:Name="LandStatsBorder" MouseLeftButtonDown="Clicked" Cursor="Hand" Visibility="Visible" Width="250" Height="54" Opacity="0" BorderThickness="2" CornerRadius="4" BorderBrush="#FFb8ce34">
        <Border.Background>
            <SolidColorBrush Color="Black" Opacity="0.5" />
        </Border.Background>
        <Grid>
            <Image Source="../../Resources/Images/stats.png" Stretch="None" HorizontalAlignment="Left" Margin="10,0,0,0">
                <Image.Effect>
                    <DropShadowEffect ShadowDepth="0" BlurRadius="0" Color="#FFb8ce34" x:Name="HighlightIcon" />
                </Image.Effect>
            </Image>
            <Line X1="0" X2="15" Y1="0" Y2="27" Stroke="#FFb8ce34" StrokeThickness="2" Margin="40,0,0,0" />
            <Line X1="0" X2="15" Y1="52" Y2="26" Stroke="#FFb8ce34" StrokeThickness="2" Margin="40,0,0,0" />
            <Grid Margin="60,0,0,0" VerticalAlignment="Center">
                <StackPanel x:Name="LandStats1" Orientation="Horizontal" Opacity="0" Visibility="Collapsed">
                    <StackPanel.RenderTransform>
                        <TranslateTransform Y="40" />
                    </StackPanel.RenderTransform>
                    <TextBlock x:Name="LandStats11" Text="{Binding Path=Stats1, Source={StaticResource Labels}}" Foreground="White" FontFamily="/Earthwatchers.UI;component/Resources/MyriadPro-Regular.otf#Myriad Pro" FontSize="12" />
                    <TextBlock x:Name="LandStats12" Text=" 2 km2" Foreground="#FFb6cd34" FontFamily="/Earthwatchers.UI;component/Resources/MyriadPro-Regular.otf#Myriad Pro" FontSize="12" />
                </StackPanel>
                <StackPanel x:Name="LandStats2" Orientation="Horizontal" Margin="0,15,0,0" Opacity="0" Visibility="Collapsed">
                    <StackPanel.RenderTransform>
                        <TranslateTransform Y="25" />
                    </StackPanel.RenderTransform>
                    <TextBlock x:Name="LandStats21" Text="{Binding Path=Stats2, Source={StaticResource Labels}}" Foreground="White" FontFamily="/Earthwatchers.UI;component/Resources/MyriadPro-Regular.otf#Myriad Pro" FontSize="12" />
                    <TextBlock x:Name="LandStats22" Text=" 2 km2" Foreground="#FFb6cd34" FontFamily="/Earthwatchers.UI;component/Resources/MyriadPro-Regular.otf#Myriad Pro" FontSize="12" />
                </StackPanel>
                <StackPanel x:Name="LandStats3" Orientation="Horizontal" Margin="0,30,0,0" Opacity="0" Visibility="Collapsed">
                    <StackPanel.RenderTransform>
                        <TranslateTransform Y="10" />
                    </StackPanel.RenderTransform>
                    <TextBlock x:Name="LandStats31" Text="{Binding Path=Stats3, Source={StaticResource Labels}}" Foreground="White" FontFamily="/Earthwatchers.UI;component/Resources/MyriadPro-Regular.otf#Myriad Pro" FontSize="12" />
                    <TextBlock x:Name="LandStats32" Text=" 2 km2" Foreground="#FFb6cd34" FontFamily="/Earthwatchers.UI;component/Resources/MyriadPro-Regular.otf#Myriad Pro" FontSize="12" />
                </StackPanel>
            </Grid>
        </Grid>
    </Border>
</UserControl>
